<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<script type="text/javascript" src="../../zxt/zxt.js"></script>
  <script>
    	importZXT("../../zxt");
  </script>
	
</head>

<body>

	<div id="optButton2" zxt="zxt.ui.OptButton" zxt.text="编辑" zxt.opt="edit" zxt.target="optC"></div>
	<table>
		<tr>
			<td>getType()</td>
			<td>返回按钮的控件类型 继承自zxt.ui.Button</td>
			<td><input type="button" name="getType" value="getType" 
				onclick="alert('操作按钮的type为'+$zxtUI.optButton2.getType());"/></td>
		</tr>
		<tr>
			<td>onClick()</td>
			<td>操作按钮单击事件 向目标发送一条{zxt.core.Message}的消息</td>
			<td></td>
		</tr>
		<tr>
			<td>onMessage(msg)</td>
			<td>按钮控件消息响应函数</td>
			<td></td>
		</tr>
	</table>
	<div><a href="../index.html">返回</a></div>
</body>

</html>


<script>
	var optC = {
		id: function(){return "optC"},
		onMessage: function(msg){
			alert(msg.data.opt);
		},
		addAttachButton : function(but){
		},
		setParent : function(p){
		}
	};
	$zxt.register(optC, "optC");


	$zxt.init();		
</script> 	